<!--
 * @Author: SongKaiWang
 * @Date: 2023-08-15 13:25:09
 * @LastEditTime: 2023-11-16 11:24:32
-->
<template>
  <div class="app-container">
    <!-- 不限地区 , 区分地区 -->
    <el-tabs v-model="activeName" type="card">
      <!-- 不限地区 -->
      <el-tab-pane :label="$t('不限地区')" name="first">
        <Nolimit @close="showEdit = false" :canEdit="canEdit" :FormData="FormData" />
      </el-tab-pane>
      <!-- 区分地区 -->
      <el-tab-pane :label="$t('区分地区')" name="second">
        <Limit ref="Limit" :FormData="FormData" />
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import Limit from './limit.vue'
import Nolimit from './nolimit.vue'
export default {
  activated() {
    this.$nextTick(() => this.$refs['TableRef']?.doLayout())
  },
  name: 'ExpressTempl',
  components: {
    Limit,
    Nolimit,
  },
  data() {
    return {
      FormData: {},
      activeName: 'first',
      showEdit: false,
      /**是否能修改 */
      canEdit: true,
    }
  },

  mounted() {},

  methods: {
    closeDialog() {
      this.activeName = 'first'
      this.showEdit = false
      if (this.$refs.Limit) {
        this.$refs.Limit.expandRowKeys = []
      }
    },
  },
}
</script>

<style lang="scss" scoped>
::v-deep .el-dialog__footer {
  padding: 0;
}
::v-deep .el-table--medium .el-table__cell {
  padding: 4px !important;
}
::v-deep .el-table .el-table__cell {
  padding: 4px !important;
}
</style>
